blob: 1ac232a348280b7581467a5e8c6141e9eccf9c92 [file] [log] [blame]
Edwin Kempin2eebd142013-03-06 15:28:34 +01001Gerrit Code Review - /projects/ REST API
2========================================
Edwin Kempind0a63922013-01-23 16:32:59 +01003
4This page describes the project related REST endpoints.
5Please also take note of the general information on the
6link:rest-api.html[REST API].
7
Edwin Kempinc3fe3cb2013-02-13 15:09:23 +01008[[project-endpoints]]
9Project Endpoints
10-----------------
11
Edwin Kempin76202742013-02-15 13:51:50 +010012[[list-projects]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +010013List Projects
14~~~~~~~~~~~~~
15[verse]
16'GET /projects/'
17
Edwin Kempind0a63922013-01-23 16:32:59 +010018Lists the projects accessible by the caller. This is the same as
19using the link:cmd-ls-projects.html[ls-projects] command over SSH,
20and accepts the same options as query parameters.
21
Edwin Kempin51a6dc92013-02-04 15:43:59 +010022As result a map is returned that maps the project names to
23link:#project-info[ProjectInfo] entries. The entries in the map are sorted
24by project name.
25
Edwin Kempin37440832013-02-06 11:36:00 +010026.Request
Edwin Kempind0a63922013-01-23 16:32:59 +010027----
28 GET /projects/?d HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +010029----
Edwin Kempind0a63922013-01-23 16:32:59 +010030
Edwin Kempin37440832013-02-06 11:36:00 +010031.Response
32----
Edwin Kempind0a63922013-01-23 16:32:59 +010033 HTTP/1.1 200 OK
34 Content-Disposition: attachment
35 Content-Type: application/json;charset=UTF-8
36
37 )]}'
38 {
39 "external/bison": {
40 "kind": "gerritcodereview#project",
41 "id": "external%2Fbison",
42 "description": "GNU parser generator"
43 },
44 "external/gcc": {
45 "kind": "gerritcodereview#project",
46 "id": "external%2Fgcc",
47 },
48 "external/openssl": {
49 "kind": "gerritcodereview#project",
50 "id": "external%2Fopenssl",
51 "description": "encryption\ncrypto routines"
52 },
53 "test": {
54 "kind": "gerritcodereview#project",
55 "id": "test",
56 "description": "\u003chtml\u003e is escaped"
57 }
58 }
59----
60
Edwin Kempina64c4b92013-01-23 11:30:40 +010061.Get all projects with their description
62****
63get::/projects/?d
64****
65
Edwin Kempind0a63922013-01-23 16:32:59 +010066[[suggest-projects]]
67The `/projects/` URL also accepts a prefix string in the `p` parameter.
68This limits the results to those projects that start with the specified
69prefix.
70List all projects that start with `platform/`:
Edwin Kempin37440832013-02-06 11:36:00 +010071
72.Request
Edwin Kempind0a63922013-01-23 16:32:59 +010073----
74 GET /projects/?p=platform%2F HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +010075----
Edwin Kempind0a63922013-01-23 16:32:59 +010076
Edwin Kempin37440832013-02-06 11:36:00 +010077.Response
78----
Edwin Kempind0a63922013-01-23 16:32:59 +010079 HTTP/1.1 200 OK
80 Content-Disposition: attachment
81 Content-Type: application/json;charset=UTF-8
82
83 )]}'
84 {
85 "platform/drivers": {
86 "kind": "gerritcodereview#project",
87 "id": "platform%2Fdrivers",
88 },
89 "platform/tools": {
90 "kind": "gerritcodereview#project",
91 "id": "platform%2Ftools",
92 }
93 }
94----
95E.g. this feature can be used by suggestion client UI's to limit results.
96
Edwin Kempin5c544e22013-03-06 13:35:45 +010097[[get-project]]
98Get Project
99~~~~~~~~~~~
100[verse]
101'GET /projects/link:#project-name[\{project-name\}]'
102
103Retrieves a project.
104
105.Request
106----
107 GET /projects/plugins%2Freplication HTTP/1.0
108----
109
110As response a link:#project-info[ProjectInfo] entity is returned that
111describes the project.
112
113.Response
114----
115 HTTP/1.1 200 OK
116 Content-Disposition: attachment
117 Content-Type: application/json;charset=UTF-8
118
119 )]}'
120 {
121 "kind": "gerritcodereview#project",
122 "id": "plugins%2Freplication",
123 "name": "plugins/replication",
124 "parent": "Public-Plugins",
125 "description": "Copies to other servers using the Git protocol"
126 }
127----
128
Bruce Zu798ea122013-02-18 16:55:43 +0800129[[create-project]]
130Create Project
131~~~~~~~~~~~~~~
132[verse]
133'PUT /projects/link:#project-name[\{project-name\}]'
134
135Creates a new project.
136
137In the request body additional data for the project can be provided as
138link:#project-input[ProjectInput].
139
140.Request
141----
142 PUT /projects/MyProject HTTP/1.0
143 Content-Type: application/json;charset=UTF-8
144
145 {
146 "description": "This is a demo project.",
147 "submit_type": "CHERRY_PICK",
148 "owners": [
149 "MyProject-Owners"
150 ]
151 }
152----
153
154As response the link:#project-info[ProjectInfo] entity is returned that
155describes the created project.
156
157.Response
158----
159 HTTP/1.1 201 Created
160 Content-Disposition: attachment
161 Content-Type: application/json;charset=UTF-8
162
163 )]}'
164 {
165 "kind": "gerritcodereview#project",
166 "id": "MyProject",
167 "name": "MyProject",
168 "parent": "All-Projects",
169 "description": "This is a demo project."
170 }
171----
172
Edwin Kempin57f303c2013-02-13 15:52:22 +0100173[[get-project-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100174Get Project Description
175~~~~~~~~~~~~~~~~~~~~~~~
176[verse]
177'GET /projects/link:#project-name[\{project-name\}]/description'
178
Edwin Kempin57f303c2013-02-13 15:52:22 +0100179Retrieves the description of a project.
180
181.Request
182----
183 GET /projects/plugins%2Freplication/description HTTP/1.0
184----
185
186.Response
187----
188 HTTP/1.1 200 OK
189 Content-Disposition: attachment
190 Content-Type: application/json;charset=UTF-8
191
192 )]}'
193 "Copies to other servers using the Git protocol"
194----
195
Edwin Kempinefec4492013-02-22 10:09:23 +0100196If the project does not have a description an empty string is returned.
197
Edwin Kempin57f303c2013-02-13 15:52:22 +0100198[[set-project-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100199Set Project Description
200~~~~~~~~~~~~~~~~~~~~~~~
201[verse]
202'PUT /projects/link:#project-name[\{project-name\}]/description'
203
Edwin Kempin57f303c2013-02-13 15:52:22 +0100204Sets the description of a project.
205
206The new project description must be provided in the request body inside
207a link:#project-description-input[ProjectDescriptionInput] entity.
208
209.Request
210----
211 PUT /projects/plugins%2Freplication/description HTTP/1.0
212 Content-Type: application/json;charset=UTF-8
213
214 {
215 "description": "Plugin for Gerrit that handles the replication.",
216 "commit_message": "Update the project description"
217 }
218----
219
220As response the new project description is returned.
221
222.Response
223----
224 HTTP/1.1 200 OK
225 Content-Disposition: attachment
226 Content-Type: application/json;charset=UTF-8
227
228 )]}'
229 "Plugin for Gerrit that handles the replication."
230----
231
Edwin Kempin114ab162013-02-28 09:25:37 +0100232If the description was deleted the response is "`204 No Content`".
233
Edwin Kempin57f303c2013-02-13 15:52:22 +0100234[[delete-project-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100235Delete Project Description
236~~~~~~~~~~~~~~~~~~~~~~~~~~
237[verse]
238'DELETE /projects/link:#project-name[\{project-name\}]/description'
239
Edwin Kempin57f303c2013-02-13 15:52:22 +0100240Deletes the description of a project.
241
Edwin Kempinefec4492013-02-22 10:09:23 +0100242The request body does not need to include a
243link:#project-description-input[ProjectDescriptionInput] entity if no
244commit message is specified.
Edwin Kempin57f303c2013-02-13 15:52:22 +0100245
Edwin Kempinefec4492013-02-22 10:09:23 +0100246Please note that some proxies prohibit request bodies for DELETE
Edwin Kempin57f303c2013-02-13 15:52:22 +0100247requests. In this case, if you want to specify a commit message, use
248link:#set-project-description[PUT] to delete the description.
249
250.Request
251----
252 DELETE /projects/plugins%2Freplication/description HTTP/1.0
253----
254
255.Response
256----
257 HTTP/1.1 204 No Content
258----
259
Edwin Kempinecad88c2013-02-14 12:09:44 +0100260[[get-project-parent]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100261Get Project Parent
262~~~~~~~~~~~~~~~~~~
263[verse]
264'GET /projects/link:#project-name[\{project-name\}]/parent'
265
Edwin Kempinecad88c2013-02-14 12:09:44 +0100266Retrieves the name of a project's parent project. For the
267`All-Projects` root project an empty string is returned.
268
269.Request
270----
271 GET /projects/plugins%2Freplication/parent HTTP/1.0
272----
273
274.Response
275----
276 HTTP/1.1 200 OK
277 Content-Disposition: attachment
278 Content-Type: application/json;charset=UTF-8
279
280 )]}'
281 "All-Projects"
282----
283
284[[set-project-parent]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100285Set Project Parent
286~~~~~~~~~~~~~~~~~~
287[verse]
288'PUT /projects/link:#project-name[\{project-name\}]/parent'
289
Edwin Kempinecad88c2013-02-14 12:09:44 +0100290Sets the parent project for a project.
291
292The new name of the parent project must be provided in the request body
293inside a link:#project-parent-input[ProjectParentInput] entity.
294
295.Request
296----
297 PUT /projects/plugins%2Freplication/parent HTTP/1.0
298 Content-Type: application/json;charset=UTF-8
299
300 {
301 "parent": "Public-Plugins",
302 "commit_message": "Update the project parent"
303 }
304----
305
306As response the new parent project name is returned.
307
308.Response
309----
310 HTTP/1.1 200 OK
311 Content-Disposition: attachment
312 Content-Type: application/json;charset=UTF-8
313
314 )]}'
315 "Public-Plugins"
316----
317
Edwin Kempin6b813372013-03-13 17:07:33 +0100318[[get-head]]
319Get HEAD
320~~~~~~~~
321[verse]
322'GET /projects/link:#project-name[\{project-name\}]/HEAD'
323
324Retrieves for a project the name of the branch to which `HEAD` points.
325
326.Request
327----
328 GET /projects/plugins%2Freplication/HEAD HTTP/1.0
329----
330
331.Response
332----
333 HTTP/1.1 200 OK
334 Content-Disposition: attachment
335 Content-Type: application/json;charset=UTF-8
336
337 )]}'
338 "refs/heads/master"
339----
340
341[[set-head]]
342Set HEAD
343~~~~~~~~
344[verse]
345'PUT /projects/link:#project-name[\{project-name\}]/HEAD'
346
347Sets `HEAD` for a project.
348
349The new ref to which `HEAD` should point must be provided in the
350request body inside a link:#head-input[HeadInput] entity.
351
352.Request
353----
354 PUT /projects/plugins%2Freplication/HEAD HTTP/1.0
355 Content-Type: application/json;charset=UTF-8
356
357 {
358 "ref": "refs/heads/stable"
359 }
360----
361
362As response the new ref to which `HEAD` points is returned.
363
364.Response
365----
366 HTTP/1.1 200 OK
367 Content-Disposition: attachment
368 Content-Type: application/json;charset=UTF-8
369
370 )]}'
371 "refs/heads/stable"
372----
373
Edwin Kempin19ea9b92013-03-20 13:20:26 +0100374[[get-repository-statistics]]
375Get Repository Statistics
376~~~~~~~~~~~~~~~~~~~~~~~~~
377[verse]
378'GET /projects/link:#project-name[\{project-name\}]/statistics.git'
379
380Return statistics for the repository of a project.
381
382.Request
383----
384 GET /projects/plugins%2Freplication/statistics.git HTTP/1.0
385----
386
387The repository statistics are returned as a
388link:#repository-statistics-info[RepositoryStatisticsInfo] entity.
389
390.Response
391----
392 HTTP/1.1 200 OK
393 Content-Disposition: attachment
394 Content-Type: application/json;charset=UTF-8
395
396 )]}'
397 {
398 "number_of_loose_objects": 127,
399 "number_of_loose_refs": 15,
400 "number_of_pack_files": 15,
401 "number_of_packed_objects": 67,
402 "number_of_packed_refs": 0,
403 "size_of_loose_objects": 29466,
404 "size_of_packed_objects": 9646
405 }
406----
407
Dave Borowitz237073a2013-04-04 16:52:27 -0700408[[get-config]]
409Get Config
410~~~~~~~~~~
411[verse]
412'GET /projects/link:#project-name[\{project-name\}]/config'
413
414Gets some configuration information about a project. Note that this
415config info is not simply the contents of `project.config`; it generally
416contains fields that may have been inherited from parent projects.
417
418.Request
419----
420 GET /projects/myproject/config
421----
422
423A link:#config-info[ConfigInfo] entity is returned that describes the
424project configuration. Some fields are only visible to users that have
425read access to `refs/meta/config`.
426
427.Response
428----
429 HTTP/1.1 200 OK
430 Content-Disposition: attachment
431 Content-Type: application/json;charset=UTF-8
432
433 )]}'
434 {
435 "kind": "gerritcodereview#project_config",
Edwin Kempina23eb102013-07-17 09:10:54 +0200436 "description": "demo project",
Edwin Kempin0cb5a562013-07-12 15:41:04 +0200437 "use_contributor_agreements": {
438 "value": true,
439 "configured_value": "TRUE",
440 "inherited_value": false
441 },
442 "use_content_merge": {
443 "value": true,
444 "configured_value": "INHERIT",
445 "inherited_value": true
446 },
447 "use_signed_off_by": {
448 "value": false,
449 "configured_value": "INHERIT",
450 "inherited_value": false
451 },
452 "require_change_id": {
453 "value": false,
454 "configured_value": "FALSE",
455 "inherited_value": true
Edwin Kempin3c99f592013-07-15 10:12:27 +0200456 },
457 "max_object_size_limit": {
458 "value": "15m",
459 "configured_value": "15m",
460 "inherited_value": "20m"
461 },
462 "submit_type": "MERGE_IF_NECESSARY",
463 "state": "ACTIVE",
David Ostrovsky9e8b2fb2013-08-30 08:09:53 +0200464 "commentlinks": {},
465 "actions": {
466 "cookbook~hello-project": {
467 "method": "POST",
468 "label": "Say hello",
469 "title": "Say hello in different languages",
470 "enabled": true
471 }
472 }
Dave Borowitz237073a2013-04-04 16:52:27 -0700473 }
474----
475
Edwin Kempina23eb102013-07-17 09:10:54 +0200476[[set-config]]
477Set Config
478~~~~~~~~~~
479[verse]
480'PUT /projects/link:#project-name[\{project-name\}]/config'
481
482Sets the configuration of a project.
483
484The new configuration must be provided in the request body as a
485link:#config-input[ConfigInput] entity.
486
487.Request
488----
489 PUT /projects/myproject/config HTTP/1.0
490 Content-Type: application/json;charset=UTF-8
491
492 {
493 "description": "demo project",
494 "use_contributor_agreements": "FALSE",
495 "use_content_merge": "INHERIT",
496 "use_signed_off_by": "INHERIT",
497 "require_change_id": "TRUE",
498 "max_object_size_limit": "10m",
499 "submit_type": "REBASE_IF_NECESSARY",
500 "state": "ACTIVE"
501 }
502----
503
504As response the new configuration is returned as a link:#config-info[
505ConfigInfo] entity.
506
507.Response
508----
509 HTTP/1.1 200 OK
510 Content-Disposition: attachment
511 Content-Type: application/json;charset=UTF-8
512
513 )]}'
514 {
515 "kind": "gerritcodereview#project_config",
516 "use_contributor_agreements": {
517 "value": false,
518 "configured_value": "FALSE",
519 "inherited_value": false
520 },
521 "use_content_merge": {
522 "value": true,
523 "configured_value": "INHERIT",
524 "inherited_value": true
525 },
526 "use_signed_off_by": {
527 "value": false,
528 "configured_value": "INHERIT",
529 "inherited_value": false
530 },
531 "require_change_id": {
532 "value": true,
533 "configured_value": "TRUE",
534 "inherited_value": true
535 },
536 "max_object_size_limit": {
537 "value": "10m",
538 "configured_value": "10m",
539 "inherited_value": "20m"
540 },
541 "submit_type": "REBASE_IF_NECESSARY",
542 "state": "ACTIVE",
543 "commentlinks": {}
544 }
545----
546
Edwin Kempinef3542f2013-03-19 13:31:49 +0100547[[run-gc]]
548Run GC
549~~~~~~
550[verse]
551'POST /projects/link:#project-name[\{project-name\}]/gc'
552
553Run the Git garbage collection for the repository of a project.
554
555.Request
556----
557 POST /projects/plugins%2Freplication/gc HTTP/1.0
558----
559
560The response is the streamed output of the garbage collection.
561
562.Response
563----
564 HTTP/1.1 200 OK
565 Content-Disposition: attachment
566 Content-Type: text/plain;charset=UTF-8
567
568 collecting garbage for "plugins/replication":
569 Pack refs: 100% (21/21)
570 Counting objects: 20
571 Finding sources: 100% (20/20)
572 Getting sizes: 100% (13/13)
573 Compressing objects: 83% (5/6)
574 Writing objects: 100% (20/20)
575 Selecting commits: 100% (7/7)
576 Building bitmaps: 100% (7/7)
577 Finding sources: 100% (41/41)
578 Getting sizes: 100% (25/25)
579 Compressing objects: 52% (12/23)
580 Writing objects: 100% (41/41)
581 Prune loose objects also found in pack files: 100% (36/36)
582 Prune loose, unreferenced objects: 100% (36/36)
583 done.
584----
585
Edwin Kempina686de92013-05-09 15:12:34 +0200586[[branch-endpoints]]
587Branch Endpoints
588----------------
589
590[[list-branches]]
591List Branches
592~~~~~~~~~~~~~
593[verse]
594'GET /projects/link:#project-name[\{project-name\}]/branches/'
595
596List the branches of a project.
597
598As result a list of link:#branch-info[BranchInfo] entries is
599returned.
600
601.Request
602----
603 GET /projects/work%2Fmy-project/branches/ HTTP/1.0
604----
605
606.Response
607----
608 HTTP/1.1 200 OK
609 Content-Disposition: attachment
610 Content-Type: application/json;charset=UTF-8
611
612 )]}'
613 [
614 {
615 "ref": "HEAD",
616 "revision": "master"
617 },
618 {
619 "ref": "refs/meta/config",
620 "revision": "76016386a0d8ecc7b6be212424978bb45959d668"
621 },
622 {
623 "ref": "refs/heads/master",
624 "revision": "67ebf73496383c6777035e374d2d664009e2aa5c"
625 },
626 {
627 "ref": "refs/heads/stable",
628 "revision": "64ca533bd0eb5252d2fee83f63da67caae9b4674",
629 "can_delete": true
630 }
631 ]
632----
633
Edwin Kempin196e1732013-05-09 15:12:34 +0200634[[get-branch]]
635Get Branch
636~~~~~~~~~~
637[verse]
638'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
639
640Retrieves a branch of a project.
641
642.Request
643----
644 GET /projects/work%2Fmy-project/branches/master HTTP/1.0
645----
646
647As response a link:#branch-info[BranchInfo] entity is returned that
648describes the branch.
649
650.Response
651----
652 HTTP/1.1 200 OK
653 Content-Disposition: attachment
654 Content-Type: application/json;charset=UTF-8
655
656 )]}'
657 {
658 "ref": "refs/heads/master",
659 "revision": "67ebf73496383c6777035e374d2d664009e2aa5c"
660 }
661----
662
Edwin Kempin5c0d6b32013-05-09 19:54:37 +0200663[[create-branch]]
664Create Branch
665~~~~~~~~~~~~~
666[verse]
667'PUT /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
668
669Creates a new branch.
670
671In the request body additional data for the branch can be provided as
672link:#branch-input[BranchInput].
673
674.Request
675----
676 PUT /projects/MyProject/branches/stable HTTP/1.0
677 Content-Type: application/json;charset=UTF-8
678
679 {
680 "revision": "76016386a0d8ecc7b6be212424978bb45959d668"
681 }
682----
683
684As response a link:#branch-info[BranchInfo] entity is returned that
685describes the created branch.
686
687.Response
688----
689 HTTP/1.1 201 Created
690 Content-Disposition: attachment
691 Content-Type: application/json;charset=UTF-8
692
693 )]}'
694 {
695 "ref": "refs/heads/stable",
696 "revision": "76016386a0d8ecc7b6be212424978bb45959d668",
697 "can_delete": true
698 }
699----
700
Edwin Kempin6ce96a12013-06-06 13:20:01 +0200701[[delete-branch]]
702Delete Branch
703~~~~~~~~~~~~~
704[verse]
705'DELETE /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
706
707Deletes a branch.
708
709.Request
710----
711 DELETE /projects/MyProject/branches/stable HTTP/1.0
712----
713
714.Response
715----
716 HTTP/1.1 204 No Content
717----
718
Edwin Kempin4425c742013-03-18 13:23:00 +0100719[[child-project-endpoints]]
720Child Project Endpoints
721-----------------------
722
723[[list-child-projects]]
724List Child Projects
725~~~~~~~~~~~~~~~~~~~
726[verse]
727'GET /projects/link:#project-name[\{project-name\}]/children/'
728
729List the direct child projects of a project.
730
731.Request
732----
733 GET /projects/Public-Plugins/children/ HTTP/1.0
734----
735
736As result a list of link:#project-info[ProjectInfo] entries is
737returned that describe the child projects.
738
739.Response
740----
741 HTTP/1.1 200 OK
742 Content-Disposition: attachment
743 Content-Type: application/json;charset=UTF-8
744
745 )]}'
746 [
747 {
748 "kind": "gerritcodereview#project",
749 "id": "plugins%2Freplication",
750 "name": "plugins/replication",
751 "parent": "Public-Plugins",
752 "description": "Copies to other servers using the Git protocol"
753 },
754 {
755 "kind": "gerritcodereview#project",
756 "id": "plugins%2Freviewnotes",
757 "name": "plugins/reviewnotes",
758 "parent": "Public-Plugins",
759 "description": "Annotates merged commits using notes on refs/notes/review."
760 },
761 {
762 "kind": "gerritcodereview#project",
763 "id": "plugins%2Fsingleusergroup",
764 "name": "plugins/singleusergroup",
765 "parent": "Public-Plugins",
766 "description": "GroupBackend enabling users to be directly added to access rules"
767 }
768 ]
769----
770
Edwin Kempinf95bd172013-03-19 11:10:57 +0100771To resolve the child projects of a project recursively the parameter
772`recursive` can be set.
773
774Child projects that are not visible to the calling user are ignored and
775are not resolved further.
776
777.Request
778----
779 GET /projects/Public-Projects/children/?recursive HTTP/1.0
780----
781
782.Response
783----
784 HTTP/1.1 200 OK
785 Content-Disposition: attachment
786 Content-Type: application/json;charset=UTF-8
787
788 )]}'
789 [
790 {
791 "kind": "gerritcodereview#project",
792 "id": "gerrit",
793 "name": "gerrit",
794 "parent": "Public-Projects",
795 "description": "Gerrit Code Review"
796 },
797 {
798 "kind": "gerritcodereview#project",
799 "id": "plugins%2Freplication",
800 "name": "plugins/replication",
801 "parent": "Public-Plugins",
802 "description": "Copies to other servers using the Git protocol"
803 },
804 {
805 "kind": "gerritcodereview#project",
806 "id": "plugins%2Freviewnotes",
807 "name": "plugins/reviewnotes",
808 "parent": "Public-Plugins",
809 "description": "Annotates merged commits using notes on refs/notes/review."
810 },
811 {
812 "kind": "gerritcodereview#project",
813 "id": "plugins%2Fsingleusergroup",
814 "name": "plugins/singleusergroup",
815 "parent": "Public-Plugins",
816 "description": "GroupBackend enabling users to be directly added to access rules"
817 },
818 {
819 "kind": "gerritcodereview#project",
820 "id": "Public-Plugins",
821 "name": "Public-Plugins",
822 "parent": "Public-Projects",
823 "description": "Parent project for plugins/*"
824 }
825 ]
826----
827
Edwin Kempin5b6c4062013-03-19 09:26:03 +0100828[[get-child-project]]
829Get Child Project
830~~~~~~~~~~~~~~~~~
831[verse]
832'GET /projects/link:#project-name[\{project-name\}]/children/link:#project-name[\{project-name\}]'
833
Edwin Kempin8a3fb5b2013-03-21 15:02:22 +0100834Retrieves a child project. If a non-direct child project should be
835retrieved the parameter `recursive` must be set.
Edwin Kempin5b6c4062013-03-19 09:26:03 +0100836
837.Request
838----
839 GET /projects/Public-Plugins/children/plugins%2Freplication HTTP/1.0
840----
841
842As response a link:#project-info[ProjectInfo] entity is returned that
843describes the child project.
844
845.Response
846----
847 HTTP/1.1 200 OK
848 Content-Disposition: attachment
849 Content-Type: application/json;charset=UTF-8
850
851 )]}'
852 {
853 "kind": "gerritcodereview#project",
854 "id": "plugins%2Freplication",
855 "name": "plugins/replication",
856 "parent": "Public-Plugins",
857 "description": "Copies to other servers using the Git protocol"
858 }
859----
860
Edwin Kempinc3fe3cb2013-02-13 15:09:23 +0100861[[dashboard-endpoints]]
862Dashboard Endpoints
863-------------------
864
Edwin Kempin76202742013-02-15 13:51:50 +0100865[[list-dashboards]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100866List Dashboards
867~~~~~~~~~~~~~~~
868[verse]
869'GET /projects/link:#project-name[\{project-name\}]/dashboards/'
870
Edwin Kempind0a63922013-01-23 16:32:59 +0100871List custom dashboards for a project.
872
Edwin Kempin55367622013-02-05 09:09:23 +0100873As result a list of link:#dashboard-info[DashboardInfo] entries is
874returned.
875
Edwin Kempind0a63922013-01-23 16:32:59 +0100876List all dashboards for the `work/my-project` project:
Edwin Kempin37440832013-02-06 11:36:00 +0100877
878.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100879----
880 GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +0100881----
Edwin Kempind0a63922013-01-23 16:32:59 +0100882
Edwin Kempin37440832013-02-06 11:36:00 +0100883.Response
884----
Edwin Kempind0a63922013-01-23 16:32:59 +0100885 HTTP/1.1 200 OK
886 Content-Disposition: attachment
887 Content-Type: application/json;charset=UTF-8
888
889 )]}'
890 [
891 {
892 "kind": "gerritcodereview#dashboard",
893 "id": "main:closed",
894 "ref": "main",
895 "path": "closed",
896 "description": "Merged and abandoned changes in last 7 weeks",
897 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
898 "default": true,
899 "title": "Closed changes",
900 "sections": [
901 {
902 "name": "Merged",
903 "query": "status:merged age:7w"
904 },
905 {
906 "name": "Abandoned",
907 "query": "status:abandoned age:7w"
908 }
909 ]
910 }
911 ]
912----
913
Edwin Kempina64c4b92013-01-23 11:30:40 +0100914.Get all dashboards of the 'All-Projects' project
915****
916get::/projects/All-Projects/dashboards/
917****
918
Edwin Kempin67e923c2013-02-14 13:57:12 +0100919[[get-dashboard]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100920Get Dashboard
921~~~~~~~~~~~~~
922[verse]
923'GET /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
924
Edwin Kempin67e923c2013-02-14 13:57:12 +0100925Retrieves a project dashboard. The dashboard can be defined on that
926project or be inherited from a parent project.
927
928.Request
929----
930 GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0
931----
932
933As response a link:#dashboard-info[DashboardInfo] entity is returned
934that describes the dashboard.
935
936.Response
937----
938 HTTP/1.1 200 OK
939 Content-Disposition: attachment
940 Content-Type: application/json;charset=UTF-8
941
942 )]}'
943 {
944 "kind": "gerritcodereview#dashboard",
945 "id": "main:closed",
946 "ref": "main",
947 "path": "closed",
948 "description": "Merged and abandoned changes in last 7 weeks",
949 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
950 "default": true,
951 "title": "Closed changes",
952 "sections": [
953 {
954 "name": "Merged",
955 "query": "status:merged age:7w"
956 },
957 {
958 "name": "Abandoned",
959 "query": "status:abandoned age:7w"
960 }
961 ]
962 }
963----
964
965To retrieve the default dashboard of a project use `default` as
966dashboard-id.
Edwin Kempin37440832013-02-06 11:36:00 +0100967
968.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100969----
970 GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +0100971----
Edwin Kempind0a63922013-01-23 16:32:59 +0100972
Edwin Kempin37440832013-02-06 11:36:00 +0100973.Response
974----
Edwin Kempind0a63922013-01-23 16:32:59 +0100975 HTTP/1.1 200 OK
976 Content-Disposition: attachment
977 Content-Type: application/json;charset=UTF-8
978
979 )]}'
980 {
981 "kind": "gerritcodereview#dashboard",
982 "id": "main:closed",
983 "ref": "main",
984 "path": "closed",
Edwin Kempin67e923c2013-02-14 13:57:12 +0100985 "description": "Merged and abandoned changes in last 7 weeks",
986 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
Edwin Kempind0a63922013-01-23 16:32:59 +0100987 "default": true,
Edwin Kempin67e923c2013-02-14 13:57:12 +0100988 "title": "Closed changes",
989 "sections": [
990 {
991 "name": "Merged",
992 "query": "status:merged age:7w"
993 },
994 {
995 "name": "Abandoned",
996 "query": "status:abandoned age:7w"
997 }
998 ]
Edwin Kempind0a63922013-01-23 16:32:59 +0100999 }
1000----
1001
Edwin Kempin67e923c2013-02-14 13:57:12 +01001002[[set-dashboard]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001003Set Dashboard
1004~~~~~~~~~~~~~
1005[verse]
1006'PUT /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
1007
Edwin Kempin67e923c2013-02-14 13:57:12 +01001008Updates/Creates a project dashboard.
1009
1010Currently only supported for the `default` dashboard.
1011
1012The creation/update information for the dashboard must be provided in
1013the request body as a link:#dashboard-input[DashboardInput] entity.
1014
1015.Request
1016----
1017 PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0
1018 Content-Type: application/json;charset=UTF-8
1019
1020 {
1021 "id": "main:closed",
1022 "commit_message": "Define the default dashboard"
1023 }
1024----
1025
1026As response the new/updated dashboard is returned as a
1027link:#dashboard-info[DashboardInfo] entity.
1028
1029.Response
1030----
1031 HTTP/1.1 200 OK
1032 Content-Disposition: attachment
1033 Content-Type: application/json;charset=UTF-8
1034
1035 )]}'
1036 {
1037 "kind": "gerritcodereview#dashboard",
1038 "id": "main:closed",
1039 "ref": "main",
1040 "path": "closed",
1041 "description": "Merged and abandoned changes in last 7 weeks",
1042 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
1043 "default": true,
1044 "title": "Closed changes",
1045 "sections": [
1046 {
1047 "name": "Merged",
1048 "query": "status:merged age:7w"
1049 },
1050 {
1051 "name": "Abandoned",
1052 "query": "status:abandoned age:7w"
1053 }
1054 ]
1055 }
1056----
1057
1058[[delete-dashboard]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001059Delete Dashboard
1060~~~~~~~~~~~~~~~~
1061[verse]
1062'DELETE /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
1063
Edwin Kempin67e923c2013-02-14 13:57:12 +01001064Deletes a project dashboard.
1065
1066Currently only supported for the `default` dashboard.
1067
Edwin Kempinefec4492013-02-22 10:09:23 +01001068The request body does not need to include a link:#dashboard-input[
John Spurlockd25fad12013-03-09 11:48:49 -05001069DashboardInput] entity if no commit message is specified.
Edwin Kempin67e923c2013-02-14 13:57:12 +01001070
1071Please note that some proxies prohibit request bodies for DELETE
1072requests.
1073
1074.Request
1075----
1076 DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0
1077----
1078
1079.Response
1080----
1081 HTTP/1.1 204 No Content
1082----
1083
Edwin Kempin34d83352013-02-06 10:40:17 +01001084
1085[[ids]]
1086IDs
1087---
1088
Edwin Kempin196e1732013-05-09 15:12:34 +02001089[[branch-id]]
1090\{branch-id\}
1091~~~~~~~~~~~~~
1092The name of a branch or `HEAD`. The prefix `refs/heads/` can be
1093omitted.
1094
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001095[[dashboard-id]]
Edwin Kempin67e923c2013-02-14 13:57:12 +01001096\{dashboard-id\}
1097~~~~~~~~~~~~~~~~
1098The ID of a dashboard in the format '<ref>:<path>'.
1099
1100A special dashboard ID is `default` which represents the default
1101dashboard of a project.
1102
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001103[[project-name]]
Edwin Kempin34d83352013-02-06 10:40:17 +01001104\{project-name\}
1105~~~~~~~~~~~~~~~~
1106The name of the project.
1107
1108
Edwin Kempin51a6dc92013-02-04 15:43:59 +01001109[[json-entities]]
1110JSON Entities
1111-------------
1112
Edwin Kempina686de92013-05-09 15:12:34 +02001113[[branch-info]]
1114BranchInfo
1115~~~~~~~~~~
1116The `BranchInfo` entity contains information about a branch.
1117
1118[options="header",width="50%",cols="1,^2,4"]
1119|=========================
1120|Field Name ||Description
1121|`ref` ||The ref of the branch.
1122|`revision` ||The revision to which the branch points.
1123|`can_delete`|`false` if not set|
1124Whether the calling user can delete this branch.
1125|=========================
1126
Edwin Kempin5c0d6b32013-05-09 19:54:37 +02001127[[branch-input]]
1128BranchInput
1129~~~~~~~~~~~
1130The `BranchInput` entity contains information for the creation of
1131a new branch.
1132
1133[options="header",width="50%",cols="1,^2,4"]
1134|=======================
1135|Field Name||Description
1136|`ref` |optional|
1137The name of the branch. The prefix `refs/heads/` can be
1138omitted. +
1139If set, must match the branch ID in the URL.
1140|`revision`|optional|
1141The base revision of the new branch. +
1142If not set, `HEAD` will be used as base revision.
1143|=======================
1144
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001145[[config-info]]
1146ConfigInfo
1147~~~~~~~~~~
1148The `ConfigInfo` entity contains information about the effective project
1149configuration.
1150
Edwin Kempin81e1d1f2013-07-15 10:13:46 +02001151[options="header",width="50%",cols="1,^2,4"]
Edwin Kempin3660c132013-07-16 08:03:11 +02001152|=========================================
1153|Field Name ||Description
Edwin Kempina23eb102013-07-17 09:10:54 +02001154|`description` |optional|
1155The description of the project.
Edwin Kempin3660c132013-07-16 08:03:11 +02001156|`use_contributor_agreements`|optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001157link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1158authors must complete a contributor agreement on the site before
1159pushing any commits or changes to this project.
Edwin Kempin3660c132013-07-16 08:03:11 +02001160|`use_content_merge` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001161link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1162Gerrit will try to perform a 3-way merge of text file content when a
1163file has been modified by both the destination branch and the change
1164being submitted. This option only takes effect if submit type is not
1165FAST_FORWARD_ONLY.
Edwin Kempin3660c132013-07-16 08:03:11 +02001166|`use_signed_off_by` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001167link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1168each change must contain a Signed-off-by line from either the author or
1169the uploader in the commit message.
Edwin Kempin3660c132013-07-16 08:03:11 +02001170|`require_change_id` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001171link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether a
1172valid link:user-changeid.html[Change-Id] footer in any commit uploaded
1173for review is required. This does not apply to commits pushed directly
1174to a branch or tag.
Edwin Kempin3c99f592013-07-15 10:12:27 +02001175|`max_object_size_limit` ||
1176The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
1177limit] of this project as a link:#max-object-size-limit-info[
1178MaxObjectSizeLimitInfo] entity.
1179|`submit_type` ||
1180The default submit type of the project, can be `MERGE_IF_NECESSARY`,
1181`FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or
1182`CHERRY_PICK`.
1183|`state` |optional|
1184The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. +
1185Not set if the project state is `ACTIVE`.
Edwin Kempin3660c132013-07-16 08:03:11 +02001186|`commentlinks` ||
Edwin Kempin8aa53af2013-07-15 10:43:15 +02001187Map with the comment link configurations of the project. The name of
1188the comment link configuration is mapped to the comment link
1189configuration, which has the same format as the
1190link:config-gerrit.html#_a_id_commentlink_a_section_commentlink[
1191commentlink section] of `gerrit.config`.
Edwin Kempin3660c132013-07-16 08:03:11 +02001192|`theme` |optional|
Edwin Kempin272402e2013-07-15 11:17:36 +02001193The theme that is configured for the project as a link:#theme-info[
1194ThemeInfo] entity.
David Ostrovsky9e8b2fb2013-08-30 08:09:53 +02001195|`actions` |optional|
1196Actions the caller might be able to perform on this project. The
1197information is a map of view names to
1198link:rest-api-changes.html#action-info[ActionInfo] entities.
Edwin Kempin3660c132013-07-16 08:03:11 +02001199|=========================================
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001200
Edwin Kempina23eb102013-07-17 09:10:54 +02001201[[config-input]]
1202ConfigInput
1203~~~~~~~~~~~
1204The `ConfigInput` entity describes a new project configuration.
1205
1206[options="header",width="50%",cols="1,^2,4"]
1207|=========================================
1208|Field Name ||Description
1209|`description` |optional|
1210The new description of the project. +
1211If not set, the description is removed.
1212|`use_contributor_agreements`|optional|
1213Whether authors must complete a contributor agreement on the site
1214before pushing any commits or changes to this project. +
1215Can be `TRUE`, `FALSE` or `INHERIT`. +
1216If not set, this setting is not updated.
1217|`use_content_merge` |optional|
1218Whether Gerrit will try to perform a 3-way merge of text file content
1219when a file has been modified by both the destination branch and the
1220change being submitted. This option only takes effect if submit type is
1221not FAST_FORWARD_ONLY. +
1222Can be `TRUE`, `FALSE` or `INHERIT`. +
1223If not set, this setting is not updated.
1224|`use_signed_off_by` |optional|
1225Whether each change must contain a Signed-off-by line from either the
1226author or the uploader in the commit message. +
1227Can be `TRUE`, `FALSE` or `INHERIT`. +
1228If not set, this setting is not updated.
1229|`require_change_id` |optional|
1230Whether a valid link:user-changeid.html[Change-Id] footer in any commit
1231uploaded for review is required. This does not apply to commits pushed
1232directly to a branch or tag. +
1233Can be `TRUE`, `FALSE` or `INHERIT`. +
1234If not set, this setting is not updated.
1235|`max_object_size_limit` |optional|
1236The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
1237limit] of this project as a link:#max-object-size-limit-info[
1238MaxObjectSizeLimitInfo] entity. +
1239If set to `0`, the max object size limit is removed. +
1240If not set, this setting is not updated.
1241|`submit_type` |optional|
1242The default submit type of the project, can be `MERGE_IF_NECESSARY`,
1243`FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or
1244`CHERRY_PICK`. +
1245If not set, the submit type is not updated.
1246|`state` |optional|
1247The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. +
1248Not set if the project state is `ACTIVE`. +
1249If not set, the project state is not updated.
1250|=========================================
1251
Edwin Kempin55367622013-02-05 09:09:23 +01001252[[dashboard-info]]
1253DashboardInfo
1254~~~~~~~~~~~~~
1255The `DashboardInfo` entity contains information about a project
1256dashboard.
1257
1258[options="header",width="50%",cols="1,^2,4"]
1259|===============================
1260|Field Name ||Description
1261|`kind` ||`gerritcodereview#dashboard`
1262|`id` ||
1263The ID of the dashboard. The ID has the format '<ref>:<path>',
1264where ref and path are URL encoded.
1265|`project` ||
1266The name of the project for which this dashboard is returned.
1267|`defining_project`||
1268The name of the project in which this dashboard is defined.
1269This is different from `project` if the dashboard is inherited from a
1270parent project.
1271|`ref` ||
1272The name of the ref in which the dashboard is defined, without the
1273`refs/meta/dashboards/` prefix, which is common for all dashboard refs.
1274|`path` ||
1275The path of the file in which the dashboard is defined.
1276|`description` |optional|The description of the dashboard.
1277|`foreach` |optional|
1278Subquery that applies to all sections in the dashboard. +
1279Tokens such as `${project}` are not resolved.
1280|`url` ||
1281The URL under which the dashboard can be opened in the Gerrit WebUI. +
1282The URL is relative to the canonical web URL. +
1283Tokens in the queries such as `${project}` are resolved.
1284|`default` |not set if `false`|
1285Whether this is the default dashboard of the project.
1286|`title` |optional|The title of the dashboard.
1287|`sections` ||
1288The list of link:#dashboard-section-info[sections] in the dashboard.
1289|===============================
1290
Edwin Kempin67e923c2013-02-14 13:57:12 +01001291[[dashboard-input]]
1292DashboardInput
1293~~~~~~~~~~~~~~
1294The `DashboardInput` entity contains information to create/update a
1295project dashboard.
1296
1297[options="header",width="50%",cols="1,^2,4"]
1298|=============================
1299|Field Name ||Description
1300|`id` |optional|
Edwin Kempinc95c5082013-03-12 16:56:25 +01001301URL encoded ID of a dashboard to which this dashboard should link to.
Edwin Kempin67e923c2013-02-14 13:57:12 +01001302|`commit_message`|optional|
1303Message that should be used to commit the change of the dashboard.
1304|=============================
1305
Edwin Kempin55367622013-02-05 09:09:23 +01001306[[dashboard-section-info]]
1307DashboardSectionInfo
1308~~~~~~~~~~~~~~~~~~~~
1309The `DashboardSectionInfo` entity contains information about a section
1310in a dashboard.
1311
1312[options="header",width="50%",cols="1,6"]
1313|===========================
1314|Field Name |Description
1315|`name` |The title of the section.
1316|`query` |The query of the section. +
1317Tokens such as `${project}` are not resolved.
1318|===========================
1319
Edwin Kempin6b813372013-03-13 17:07:33 +01001320[[head-input]]
1321HeadInput
1322~~~~~~~~~
1323The `HeadInput` entity contains information for setting `HEAD` for a
1324project.
1325
1326[options="header",width="50%",cols="1,6"]
1327|============================
1328|Field Name |Description
1329|`ref` |
1330The ref to which `HEAD` should be set, the `refs/heads` prefix can be
1331omitted.
1332|============================
1333
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001334[[inherited-boolean-info]]
1335InheritedBooleanInfo
1336~~~~~~~~~~~~~~~~~~~~
1337A boolean value that can also be inherited.
1338
1339[options="header",width="50%",cols="1,^2,4"]
1340|================================
1341|Field Name ||Description
1342|`value` ||
1343The effective boolean value.
1344|`configured_value` ||
1345The configured value, can be `TRUE`, `FALSE` or `INHERITED`.
1346|`inherited_value` |optional|
1347The boolean value inherited from the parent. +
1348Not set if there is no parent.
1349|================================
1350
Edwin Kempin3c99f592013-07-15 10:12:27 +02001351[[max-object-size-limit-info]]
1352MaxObjectSizeLimitInfo
1353~~~~~~~~~~~~~~~~~~~~~~
1354The `MaxObjectSizeLimitInfo` entity contains information about the
1355link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
1356limit] of a project.
1357
1358[options="header",width="50%",cols="1,^2,4"]
1359|===============================
1360|Field Name ||Description
1361|`value` |optional|
1362The effective value of the max object size limit as a formatted string. +
1363Not set if there is no limit for the object size.
1364|`configured_value`|optional|
1365The max object size limit that is configured on the project as a
1366formatted string. +
1367Not set if there is no limit for the object size configured on project
1368level.
1369|`inherited_value` |optional|
1370The max object size limit that is inherited as a formatted string. +
1371Not set if there is no global limit for the object size.
1372|===============================
1373
Edwin Kempin57f303c2013-02-13 15:52:22 +01001374[[project-description-input]]
1375ProjectDescriptionInput
1376~~~~~~~~~~~~~~~~~~~~~~~
1377The `ProjectDescriptionInput` entity contains information for setting a
1378project description.
1379
1380[options="header",width="50%",cols="1,^2,4"]
1381|=============================
1382|Field Name ||Description
1383|`description` |optional|The project description. +
1384The project description will be deleted if not set.
1385|`commit_message`|optional|
1386Message that should be used to commit the change of the project
1387description in the `project.config` file to the `refs/meta/config`
1388branch.
1389|=============================
1390
Edwin Kempin51a6dc92013-02-04 15:43:59 +01001391[[project-info]]
1392ProjectInfo
1393~~~~~~~~~~~
1394The `ProjectInfo` entity contains information about a project.
1395
1396[options="header",width="50%",cols="1,^2,4"]
1397|===========================
1398|Field Name ||Description
1399|`kind` ||`gerritcodereview#project`
1400|`id` ||The URL encoded project name.
1401|`name` |
1402not set if returned in a map where the project name is used as map key|
1403The name of the project.
Edwin Kempinf3611822013-03-19 08:23:09 +01001404|`parent` |optional|
Edwin Kempin51a6dc92013-02-04 15:43:59 +01001405The name of the parent project. +
1406`?-<n>` if the parent project is not visible (`<n>` is a number which
1407is increased for each non-visible project).
1408|`description` |optional|The description of the project.
1409|`branches` |optional|Map of branch names to HEAD revisions.
1410|===========================
1411
Bruce Zu798ea122013-02-18 16:55:43 +08001412[[project-input]]
1413ProjectInput
1414~~~~~~~~~~~~
1415The `ProjectInput` entity contains information for the creation of
1416a new project.
1417
1418[options="header",width="50%",cols="1,^2,4"]
1419|=========================================
1420|Field Name ||Description
1421|`name` |optional|
1422The name of the project (not encoded). +
1423If set, must match the project name in the URL.
1424|`parent` |optional|
1425The name of the parent project. +
1426If not set, the `All-Projects` project will be the parent project.
1427|`description` |optional|The description of the project.
1428|`permissions_only` |`false` if not set|
1429Whether a permission-only project should be created.
1430|`create_empty_commit` |`false` if not set|
1431Whether an empty initial commit should be created.
1432|`submit_type` |optional|
1433The submit type that should be set for the project
1434(`MERGE_IF_NECESSARY`, `REBASE_IF_NECESSARY`, `FAST_FORWARD_ONLY`,
1435`MERGE_ALWAYS`, `CHERRY_PICK`). +
1436If not set, `MERGE_IF_NECESSARY` is set as submit type.
1437|`branches` |optional|
1438A list of branches that should be initially created. +
1439For the branch names the `refs/heads/` prefix can be omitted.
1440|`owners` |optional|
1441A list of groups that should be assigned as project owner. +
1442Each group in the list must be specified as
1443link:rest-api-groups.html#group-id[group-id]. +
1444If not set, the link:config-gerrit.html#repository.name.ownerGroup[
1445groups that are configured as default owners] are set as project
1446owners.
1447|`use_contributor_agreements`|`INHERIT` if not set|
1448Whether contributor agreements should be used for the project (`TRUE`,
1449`FALSE`, `INHERIT`).
1450|`use_signed_off_by` |`INHERIT` if not set|
1451Whether the usage of 'Signed-Off-By' footers is required for the
1452project (`TRUE`, `FALSE`, `INHERIT`).
1453|`use_content_merge` |`INHERIT` if not set|
1454Whether content merge should be enabled for the project (`TRUE`,
1455`FALSE`, `INHERIT`). +
1456`FALSE`, if the `submit_type` is `FAST_FORWARD_ONLY`.
1457|`require_change_id` |`INHERIT` if not set|
1458Whether the usage of Change-Ids is required for the project (`TRUE`,
1459`FALSE`, `INHERIT`).
Sasa Zivkov6b40cb42013-07-01 15:28:22 +02001460|`max_object_size_limit` |optional|
1461Max allowed Git object size for this project.
1462Common unit suffixes of 'k', 'm', or 'g' are supported.
Bruce Zu798ea122013-02-18 16:55:43 +08001463|=========================================
1464
Edwin Kempinecad88c2013-02-14 12:09:44 +01001465[[project-parent-input]]
1466ProjectParentInput
1467~~~~~~~~~~~~~~~~~~
1468The `ProjectParentInput` entity contains information for setting a
1469project parent.
1470
1471[options="header",width="50%",cols="1,^2,4"]
1472|=============================
1473|Field Name ||Description
1474|`parent` ||The name of the parent project.
1475|`commit_message`|optional|
1476Message that should be used to commit the change of the project parent
1477in the `project.config` file to the `refs/meta/config` branch.
1478|=============================
1479
Edwin Kempin19ea9b92013-03-20 13:20:26 +01001480[[repository-statistics-info]]
1481RepositoryStatisticsInfo
1482~~~~~~~~~~~~~~~~~~~~~~~~
1483The `RepositoryStatisticsInfo` entity contains information about
1484statistics of a Git repository.
1485
1486[options="header",width="50%",cols="1,6"]
1487|======================================
1488|Field Name |Description
1489|`number_of_loose_objects` |Number of loose objects.
1490|`number_of_loose_refs` |Number of loose refs.
1491|`number_of_pack_files` |Number of pack files.
1492|`number_of_packed_objects`|Number of packed objects.
1493|`number_of_packed_refs` |Number of packed refs.
1494|`size_of_loose_objects` |Size of loose objects in bytes.
1495|`size_of_packed_objects` |Size of packed objects in bytes.
1496|======================================
1497
Edwin Kempin272402e2013-07-15 11:17:36 +02001498[[theme-info]]
1499ThemeInfo
1500~~~~~~~~~
1501The `ThemeInfo` entity describes a theme.
1502
1503[options="header",width="50%",cols="1,^2,4"]
1504|=============================
1505|Field Name ||Description
1506|`css` |optional|
1507The path to the `GerritSite.css` file.
1508|`header` |optional|
1509The path to the `GerritSiteHeader.html` file.
1510|`footer` |optional|
1511The path to the `GerritSiteFooter.html` file.
1512|=============================
1513
Edwin Kempind0a63922013-01-23 16:32:59 +01001514
1515GERRIT
1516------
1517Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07001518
1519SEARCHBOX
1520---------